//
//  BBBtDateUtil.h
//  BabyThermometer
//
//  Created by CaiLei on 10/11/14.
//  Copyright (c) 2014 baohu. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, Bt_Data_Type) {
    Bt_Data_Type_Unknown = 0x00,
    Bt_Data_Type_Temparature = 0x91,
    Bt_Data_Type_Error = 0x94,
    Bt_Data_Type_Ack = 0x95,
};


@interface BBBtDateUtil : NSObject
+ (NSData *)dataFromHexString:(NSString *)hexString error:(NSError **)error;

+ (Bt_Data_Type)dataTypeFor:(NSData *)data;

/**
 *  低于34返回99.0
 *  高于42返回100.0
 *  数据格式不对，返回 MAXFLOAT
 */
+ (CGFloat)temparatureFromData:(NSData *)data;
+ (NSData *)dataWithDate:(NSDate *)date;
@end
